#pragma once

#include "IBitmapData.h"

class Locker
{
private:
	FTLib::IBitmapData*		ptrBitmap;
	FTLib::BitmapLockInfo	lockInfo;
public:
	Locker(FTLib::IBitmapData* ptrBitmap) : ptrBitmap(ptrBitmap)
	{
		this->lockInfo = this->ptrBitmap->Lock();
	}

	const FTLib::BitmapLockInfo&	GetLockInfo() const{ return this->lockInfo; }

	~Locker()
	{
		this->ptrBitmap->Unlock();
	}
};